/**
 * @license
 * Copyright 2024 The Model Explorer Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ==============================================================================
 */

.container {
  box-shadow: var(--me-bubble-shadow);
  transform-origin: top center;
  font-size: 12px;
  padding: 8px 0;
  border-radius: 4px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  max-height: 100%;
  overflow-y: auto;

  input {
    font-family: sans-serif;
    font-size: 12px;
    margin: 4px 10px;
    width: calc(100% - 20px);
    box-sizing: border-box;
    pointer-events: all;
    border: 1px solid var(--me-outline-variant-color);
    height: 20px;
    border-radius: 4px;
    padding: 0 2px;
    min-width: 184px;
  }

  .collection-container {
    .collection-label {
      font-weight: 700;
      padding: 4px 12px;
    }
  }

  .graph-item-container {
    .graph-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 12px 4px 24px;
      cursor: pointer;

      &:hover {
        background-color: var(--me-surface-container-high-color);
      }

      &.selected {
        color: var(--me-on-secondary-container-color);
        background-color: var(--me-secondary-container-color);

        .action-button {
          .block-container {
            border-color: var(--me-on-secondary-container-color);

            .right-block {
              background-color: var(--me-on-secondary-container-color);
            }
          }
        }
      }

      .graph-info-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-grow: 1;
      }

      .graph-label-wrapper {
        display: flex;
        align-items: center;
      }

      .indent-symbol {
        font-size: 16px;
        width: 16px;
        height: 16px;
        color: var(--me-on-surface-low-color);
        margin-right: 4px;
        transform: rotate(-180deg);
      }

      .graph-label {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      .node-count-label {
        color: var(--me-on-surface-low-color);
        margin-left: 12px;
      }

      .action-button {
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        margin-left: 6px;
        opacity: 0.8;
        cursor: pointer;

        &:hover {
          opacity: 1;
        }

        .block-container {
          border-radius: 3px;
          border: 1px solid var(--me-on-surface-low-color);
          height: 100%;
          width: 100%;
          box-sizing: border-box;
          display: flex;
          align-items: center;
          justify-content: flex-end;
          padding: 1px;

          .right-block {
            height: 100%;
            width: 50%;
            background-color: var(--me-on-surface-low-color);
            border-top-right-radius: 2px;
            border-bottom-right-radius: 2px;
          }
        }
      }
    }
  }
}
